var $ = require('../../utils/Ajax.js');
Page({
  data: {
    Schedule: null
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: "提现进度"
    })
    var that = this;
    $.Ajax("api/x_cash_list", "POST", {}, function (res) {
      var Schedule = res.d.cash
      if (Schedule.length != 0 || Schedule != null) {
        that.setData({
          Schedule: Schedule
        })
      }
    });
  },

  // 监听用户下拉刷新
  onPullDownRefresh: function () {
    var that = this;
    $.Ajax("api/x_cash_list", "POST", {}, function (res) {
      var Schedule = res.d.cash
      if (Schedule.length != 0 || Schedule != null) {
        that.setData({
          Schedule: Schedule
        })
      }
      wx.stopPullDownRefresh({
        success: function (res) {
          wx.showToast({
            title: '刷新成功',
            icon: 'succes',
            duration: 2000,
            mask: true
          })
        }
      })
    });
  }
})